<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../font/iconfont.css">
    <script src="../js/vue.js"></script>
    <style>
        body{
            background-color: #583E7E;
            margin: 0px;
        }
        .side-bar{
            position: absolute;
            top: 0px;
            bottom: 0px;
            /* left: -350px; */
            width: 350px;
            background-color: black;
            color: white;
            transition: all 300ms ease-in;
            transform: translateX(-100%);
        }
        .title{
            border-bottom: 1px solid #cccccc;
            font-size: 18px;
            padding: 0px 12px;
            height: 60px;
            line-height: 60px;
        }
        .title>i{
            font-size: 36px;
            float: right;
            cursor: pointer;
        }
        .menus{
            margin: 0px;
            padding: 20px 0px;
            font-size: 20px;
        }
        .menus > li {
            padding: 20px;
            cursor: pointer;
        }
        .menus > li:hover {
            background-color: #583E7E;
        }
        .menus > li > i{
            font-size: 32px;
            vertical-align: middle;
            margin-right: 12px;
        }
        .open-btn >i{
            color: white;
            font-size: 52px;
            cursor: pointer;
        }
    </style>
</head>

<body>
    <div id="app">
        <nav class="side-bar" v-bind:style=" `transform: translateX(${left}%);` ">
            <div class="title">
                <span>xxxxx管理</span>
                <i class="iconfont icon-close" @click=" left=-100 "></i>
            </div>
            <ul class="menus">
                <li>
                    <i class="iconfont icon-users"></i>
                    <span>员工管理</span>
                </li>
                <li>
                    <i class="iconfont icon-types"></i>
                    <span>部门管理</span>
                </li>
                <li>
                    <i class="iconfont icon-flexible"></i>
                    <span>组织管理</span>
                </li>
                <li>
                    <i class="iconfont icon-like"></i>
                    <span>健康统计</span>
                </li>
            </ul>
        </nav>

        <span class="open-btn" @click=" left=0 ">
            <i class="iconfont icon-calendar"></i>
        </span>
    </div>
</body>
<script>
    new Vue({
        el: "#app",
        data:{
            left:-100
        }
    })
</script>

</html>